<!-- $Id: goods_list.htm 17126 2010-04-23 10:30:26Z  $ -->

{if $full_page}
{include file="pageheader.htm"}
{insert_scripts files="../js/utils.js,listtable.js"}

<!-- 商品列表 -->
<form method="post" action="" name="listForm" onsubmit="return confirmSubmit(this)">
  <!-- start goods list -->
  <div class="list-div" id="listDiv">
{/if}
<table cellpadding="3" cellspacing="1">
  <tr>
    <th>
      <input onclick='listTable.selectAll(this, "checkboxes")' type="checkbox" />
      <a href="javascript:listTable.sort('goods_id'); ">Proposal ID</a>{$sort_goods_id}
    </th>
	<th><a href="javascript:listTable.sort('goods_name'); ">User Name</a>{$sort_goods_name}</th>
    <th><a href="javascript:listTable.sort('goods_name'); ">Proposal Subject</a>{$sort_goods_name}</th>
	<th><a href="javascript:listTable.sort('goods_name'); ">Project Subject</a>{$sort_goods_name}</th>
    <th><a href="javascript:listTable.sort('goods_sn'); ">Approx Price</a>{$sort_goods_sn}</th>
    <th><a href="javascript:listTable.sort('is_on_sale'); ">Proposal Date</a>{$sort_is_on_sale}</th>
    <th><a href="javascript:listTable.sort('is_best'); ">Awarded</a>{$sort_is_best}</th>
    <th>Handler</th>
  <tr>
  {foreach from=$proposals_list item=proposal}
  <tr>
    <!--<td><input type="checkbox" name="checkboxes[]" value="{$project.goods_id}" />{$project.goods_id}</td> -->
	<td><input type="checkbox" onclick="changeAction()" name="checkboxes[]" value="{$project.goods_id}"  />{$proposal.ppid}</td>
    <!--<td class="first-cell" style="{if $project.is_promote}color:red;{/if}"><span onclick="listTable.edit(this, 'edit_goods_name', {$project.goods_id})">{$project.goods_name|escape:html}</span></td> -->
	<td class="first-cell" style="{if $project.is_promote}color:red;{/if}"><span onclick="listTable.edit(this, 'edit_goods_name', {$project.goods_id})">{$proposal.user_name|escape:html}</span></td>
	<td class="first-cell" style="{if $project.is_promote}color:red;{/if}"><a href="proposals.php?act=proposal_detail&pid={$proposal.pid}&ppid={$proposal.ppid}">{$proposal.proposalSubject|escape:html}</a></td>
	<td align="center"><span onclick="listTable.edit(this, 'edit_goods_sn', {$project.goods_id})">{$proposal.subject}</span></td>
    <td><span onclick="listTable.edit(this, 'edit_goods_sn', {$project.goods_id})">{$proposal.approxPrice}</span></td>
    <td align="right"><span onclick="listTable.edit(this, 'edit_goods_price', {$project.goods_id})">{$proposal.proposaledDate}
    </span></td>
    <td align="right"><span onclick="listTable.edit(this, 'edit_goods_number', {$project.goods_id})">{$proposal.awarded}</span></td>
    <td align="center">
      <a href="proposals.php?act=proposal_detail&pid={$proposal.pid}&ppid={$proposal.ppid}" title="view"><img src="/admin/images/icon_view.gif" width="16" height="16" border="0" /></a>
      <a href="proposals.php?act=proposal_delete&ppid={$proposal.ppid}" title="delete"><img src="/admin/images/icon_drop.gif" width="16" height="16" border="0" /></a>
    </td>
  </tr>
  {/foreach}
</table>
<!-- end goods list -->

<!-- 分页 -->
<table id="page-table" cellspacing="0">
  <tr>
    <td align="right" nowrap="true">
    {include file="page.htm"}
    </td>
  </tr>
</table>

{if $full_page}
</div>

<div>
  <input type="hidden" name="act" value="batch" />  	  
  <input type="submit" value="{$lang.button_submit}" id="btnSubmit" name="btnSubmit" class="button" disabled="true" />
</div>
</form>

<script type="text/javascript">
  

  function changeAction()
{
	
	var oCheckBox = document.getElementsByName('checkboxes[]');
	for(var i = 0; i < oCheckBox.length; i++)
	{
		if(oCheckBox[i].checked == true)
		{
			document.getElementById('btnSubmit').removeAttribute('disabled');
			return 0;
		}
	}
	document.getElementById('btnSubmit').setAttribute('disabled','disabled');
}

</script>
{include file="pagefooter.htm"}
{/if}